// 模拟用户登录
export const login = (username, password) => {
  // 模拟用户登录返回的 Promise 对象
  /* eslint-disable-next-line */
    return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve({
        username,
        token: 'ouqeriouqojerlkjadfklasdfjioqjerouiadlfkjioqwerujhasd'
      })
    }, 1000)
  })
}

// 模拟用户登录
export const logout = () => {
  // 模拟用户登录返回的 Promise 对象.
  /* eslint-disable-next-line */
      return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve({
        success: true
      })
    }, 1000)
  })
}
